﻿<UserControl x:Class="AutoLoL.Tabs.AutoChatTab"
             x:Name="UserControl"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:controls="clr-namespace:AutoLoL.Controls"
             xmlns:converters="clr-namespace:AutoLoL.Converters"
             xmlns:logic="clr-namespace:AutoLoL.Logic;assembly=AutoLoL.Logic"
             mc:Ignorable="d"
             d:DesignHeight="300" d:DesignWidth="400">
    <UserControl.Resources>
        <converters:ObjectToVisibilityConverter x:Key="ObjectToVisibilityConverter" />
        <logic:UserSettings x:Key="UserSettingsClass" />
    </UserControl.Resources>
    <DockPanel LastChildFill="True">
        <ContentControl Template="{StaticResource Notification}" DockPanel.Dock="Top" Margin="10 10 10 0" Visibility="{Binding Source={StaticResource UserSettingsClass}, Path=Instance.IsAutoChatEnabled, Converter={StaticResource ObjectToVisibilityConverter}, ConverterParameter=True}">
            <TextBlock Margin="5">AutoChat is currently disabled. It can be enabled in the Settings tab.</TextBlock>
        </ContentControl>
        <StackPanel DockPanel.Dock="Top" Orientation="Horizontal" Margin="10">
            <Button Name="EditButton" Width="75" Height="23" Click="EditButton_Click" HorizontalAlignment="Left" HorizontalContentAlignment="Left">
                <Button.Content>
                    <StackPanel Orientation="Horizontal">
                        <Image Height="16" Width="16" Source="pack://siteoforigin:,,,/Data/Images/Icons/document--pencil.png" />
                        <TextBlock Margin="5 0 0 0" Text="Edit" />
                    </StackPanel>
                </Button.Content>
            </Button>
            <Button Name="PrintButton" Width="75" Height="23" Margin="10 0 0 0" Click="PrintButton_Click" HorizontalAlignment="Left" HorizontalContentAlignment="Left">
                <Button.Content>
                    <StackPanel Orientation="Horizontal">
                        <Image Height="16" Width="16" Source="pack://siteoforigin:,,,/Data/Images/Icons/document-export.png" />
                        <TextBlock Margin="5 0 0 0" Text="Export" />
                    </StackPanel>
                </Button.Content>
            </Button>
            <Button Name="SaveButton" Width="75" Height="23" Click="SaveButton_Click" HorizontalAlignment="Left" HorizontalContentAlignment="Left" Visibility="Collapsed">
                <Button.Content>
                    <StackPanel Orientation="Horizontal">
                        <Image Height="16" Width="16" Source="pack://siteoforigin:,,,/Data/Images/Icons/disk.png" />
                        <TextBlock Margin="5 0 0 0" Text="Save" />
                    </StackPanel>
                </Button.Content>
            </Button>
            <Button Name="CancelButton" Width="75" Height="23" Margin="10 0 0 0" Click="CancelButton_Click" HorizontalAlignment="Left" HorizontalContentAlignment="Left"  Visibility="Collapsed">
                <Button.Content>
                    <StackPanel Orientation="Horizontal">
                        <Image Height="16" Width="16" Source="pack://siteoforigin:,,,/Data/Images/Icons/cross.png" />
                        <TextBlock Margin="5 0 0 0" Text="Cancel" />
                    </StackPanel>
                </Button.Content>
            </Button>
        </StackPanel>
        <Grid Margin="10 0 10 10">
            <Border Name="EditBorder" BorderBrush="#FF333333" BorderThickness="1">
                <ScrollViewer>
                    <StackPanel Name="ItemsStackPanel" Margin="5" />
                </ScrollViewer>
            </Border>
        </Grid>
    </DockPanel>
</UserControl>
